import Vue from 'vue';
import Vuex from 'vuex';
import createPersistedState from 'vuex-persistedstate';
import tag from './model/tags';
import common from './model/common';
import companyInfo from './model/companyInfo';
import reward from "./model/reward";
import personnel from './model/personnel';
import setStorage from "./model/setStorage";

Vue.use(Vuex);
export default new Vuex.Store({
  modules: {
    common,
    tag,
    companyInfo,
    reward,
    personnel,
    setStorage
  },
  // 数据持久化存储在 sessionStorage 中
  plugins: [createPersistedState({ storage: window.sessionStorage })]
});
